package com.ymatou.iapi.userservice.parameter.enums;

/**
 * Created by liguo on 2016/12/22.
 */
public enum UserLogoActionEnum {
    Add(0, "Add"),
    UpdateAction(1, "UpdateAction"),
    Search(2, "Search"),
    SearchList(3, "SearchList");

    UserLogoActionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private int code;
    private String message;

    public static UserLogoActionEnum getByCode(Integer code) {
        for (UserLogoActionEnum appSourceEnum : UserLogoActionEnum.values()) {
            if (appSourceEnum.getCode() == code) {
                return appSourceEnum;
            }
        }
        return null;
    }
}
